import {ElMessage} from "element-plus";

function ElMessageFuc(message, type = 'success') {
    ElMessage({
        message,
        type
    })
}

class ElMessageClass {
    static elMessageFuc = new ElMessageClass()

    success(message) {
        ElMessageFuc(message, 'success')
    }

    error(message) {
        ElMessageFuc(message, 'error')
    }

    warning(message) {
        ElMessageFuc(message, 'warning')
    }

    info(message) {
        ElMessageFuc(message, 'info')
    }
}

export default ElMessageClass.elMessageFuc